<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<scr>, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr =[{id:1001,name:"lisi"},{id:1002,name:"zhangsan"},{id:1004,name:"wangwu"}];
        var index = arr.findIndex(item =>{
            return item.id==1002;
        })
        console.log(index)
        arr.splice(1,1);
        console.log(arr);
    </script>
</body>
</html>